﻿using Newtonsoft.Json.Linq;
using Qianke.Core.Common.Interface;
using System;
using System.Collections.Generic;
using System.Text;
using Volo.Abp.DependencyInjection;

namespace Qianke.Core.Common.Models
{
    public class SaasRequestInfo : IScopedDependency
    {
        public string RequstBody { get; set; } = string.Empty;


        public JToken RequstJToken { get; set; } = new JObject();


        public string Token { get; set; }

        public ITokenInfo TokenModel { get; set; }

        public void SetTokenModel(ITokenInfo tokenInfo)
        {
            if (TokenModel == null)
            {
                TokenModel = tokenInfo;
                return;
            }

            TokenModel.Id = tokenInfo.Id;
            TokenModel.Name = tokenInfo.Name;
            TokenModel.LastTime = tokenInfo.LastTime;
            TokenModel.OrganId = tokenInfo.OrganId;
        }
    }
}
